/*
 * Engineer.java
 * Team qq 2011
 */
package com.google.code.timetrail.backend;

/**
 * A person who has technical prowess who can fix parts on the space ship and
 * prevent breaks and other disasters from happening
 * 
 * @author Anuraag
 * @version 1.0
 * 
 */
public class Engineer extends Person {

	/**
	 * the version ID of Engineer, CHANGE IT if control gets incompatibly
	 * changed
	 **/
	private static final long serialVersionUID = 4020L;

	/** Amount of skill for engineer */
	private static final int ENGINEER_SKILL = 30;
	
	/**
	 * The Engineer checks the health of a spaceship
	 * 
	 * @param spaceship
	 *            the ship to check up on
	 * @return spaceship's heath
	 */
	@Deprecated
	public int checkSpaceshipHealth(Spaceship spaceship) {
		return spaceship.getHealth();
	}

	/**
	 * Sets the Engineer's skill values The skills are all 0, except for the
	 * swimming skill which is 30
	 */
	@Override
	public void intializeSkills() {
		final int[] skillSet = { ENGINEER_SKILL, 0, 0, 0 };
		super.setSkills(skillSet);
	}

	/**
	 * Heals the spaceship based on scraps and other factors
	 * 
	 * @param spaceship
	 * @return new health of the spaceship
	 */
	@Deprecated
	public int repair(Spaceship spaceship) {
		return 0;
	}

	/**
	 * Prints out a string for an engineer
	 * 
	 * @return a string representation of an engineer
	 */
	@Override
	public String toString() {
		return super.toString() + " is an Engineer";
	}
}
